# Contributor: Zach DeCook <zachdecook@librem.one>
# Maintainer: Zach DeCook <zachdecook@librem.one>
pkgname=udis86-git
pkgver=1.7.2_git20221013
_commit=5336633af70f3917760a6d441ff02d93477b0c86
pkgrel=1
pkgdesc="Disassembler Library for x86 and x86-64"
url="https://github.com/canihavesomecoffee/udis86"
arch="all"
license="BSD-2-Clause"
source="https://github.com/canihavesomecoffee/udis86/archive/$_commit/udis86-$_commit.tar.gz"
makedepends="autoconf automake libtool m4 python3"
subpackages="$pkgname-dev $pkgname-doc"
builddir="$srcdir/udis86-$_commit"

build() {
	mkdir -p build/m4
	autoreconf --force -v --install
	./configure --prefix=/usr --enable-shared
	make
}

check() {
	make check
}

package() {
	make -j1 DESTDIR="$pkgdir" install
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}


sha512sums="
64fc65b7388db25b6a8b008b51e274753e5e8b1dbd48126bdd676a3d0276ce37a4140bc5d08d6499ab5e61f51109eb8b9d1b14588bf8dc6d44d1642305403a82  udis86-5336633af70f3917760a6d441ff02d93477b0c86.tar.gz
"
